#ifndef AFFECTS_T
#define AFFECTS_T

#include <algorithm>
#include "PKB.h"

class Affects{
private:
	PKB* pkb;
	vector<vector<int>> affectsMatrix;
	vector<pair<int,int>> affectsList;

	StmtTable st;
	VarTable varT;
	vector<int> modifiesMap;
	vector<vector<int>> usesMatrix;
	vector<vector<int>> vModifiedByLine;
	int totalLineNum;

	int DealWithAssign(int);
	int DealWithWhile(int);
	int DealWithIf(int);
	int DealWithCalls(int);
	vector<vector<int>> mergeVMList(vector<vector<int>>,vector<vector<int>>);

public:
	Affects(PKB*);
	vector<vector<int>> ComputeAffects();
	vector<pair<int,int>> GetAffectsList();
};

#endif